<?php
/**
 * @Notes: 文件描述
 * @Interface getCondition
 * @Return mixed
 * @Author: fc
 * @Time: 2021/9/23 11:25
 */

namespace app\common\event;

use app\common\model\OrderGoods as OrderGoodsModel;
use think\Exception;


class OrderGoods
{

    //public function beforeUpdate($order)
    //{
    //    if (50 != $order->order_state)
    //    {
    //        return false;
    //    }
    //}

    public function afterUpdate($order)
    {
        $updateData['order_state'] = $order->order_state;
        $updateData['update_time'] = time();

        OrderGoodsModel::where('order_id', $order->id)->update($updateData);

        //throw new Exception('添加订单分表记录失败',455);
    }



}